<tagLib name="html" />
<include file="../Public/header" />
<div id="wrap"> <include file="../Public/top" />
  <div id="content">
    <div class="mainarea">
      <div class="maininner">
        <div class="bdrcontent">
          <form action="__URL__/insert" method="post" enctype="multipart/form-data" id="phpform" onsubmit="return $.formValidator.pageIsValid('1')">
            <input name="nid" value="{.nid}" type="hidden" />
            <table width="100%" cellpadding="0" cellspacing="0" class="formtable">
              <tr>
                <td width="100">产品名称：</td>
                <td><input name="name" type="text" size="40" id="name"   /></td>
              </tr>
              <tr>
                <td>请选择分类：</td>
                <td><select name="categoryID" id="categoryID">
                    <volist name="category" id="category">
                      <option value="{$category.id}">{$category.name}</option>
                    </volist>
                  </select></td>
              </tr>
              <tr>
                <td>型号：</td>
                <td><label for="model"></label>
                <input type="text" name="model" id="model" /></td>
              </tr>
              <tr>
                <td>市场价：</td>
                <td><label for="price1"></label>
                <input type="text" name="price1" id="price1" /></td>
              </tr>
              <tr>
                <td>优惠价：</td>
                <td><input type="text" name="price2" id="price2" /></td>
              </tr>
              <tr>
                <td>产品说明：</td>
                <td><html:editor type="fckeditor"  id="editor" width="550px" height="245px" name="content"  />                </td>
              </tr>
              <tr>
                <td>
                  <label for="fileField">图片上传：</label>                </td>
                <td><input type="file" name="file1" id="file1" /></td>
              </tr>
              <tr>
                <td></td>
                <td><input type="submit" value="提交" class="button" /></td>
              </tr>
            </table>
          </form>
        </div>
        <br />
      </div>
    </div>
    <include file="../Public/menu" /> </div>
  <include file="../Public/footer" /> </div>
</body></html><script type="text/javascript">
    $(document).ready(function()
    {
        $('#categoryID option[@value="{.fid}"]').attr('selected','selected');
		
		
		$.formValidator.initConfig({autotip:true,onerror:function(msg){alert(msg)}});
		//$("#id").formValidator({onshow:"请输入id",onfocus:"id至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的id长度不正确,请确认"});
		//$("#nid").formValidator({onshow:"请输入nid",onfocus:"nid至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的nid长度不正确,请确认"});
		//$("#categoryID").formValidator({onshow:"请输入categoryID",onfocus:"categoryID至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:1,onerror:"你输入的categoryID长度不正确,请确认"});
		$("#name").formValidator({onshow:"请输入name",onfocus:"name至少要输入3个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:6,onerror:"你输入的name长度不正确,请确认"});
		//$("#model").formValidator({onshow:"请输入model",onfocus:"model至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的model长度不正确,请确认"});
		//$("#price1").formValidator({onshow:"请输入price1",onfocus:"price1至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的price1长度不正确,请确认"});
		//$("#price2").formValidator({onshow:"请输入price2",onfocus:"price2至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的price2长度不正确,请确认"});
		//$("#browseNum").formValidator({onshow:"请输入browseNum",onfocus:"browseNum至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的browseNum长度不正确,请确认"});
		//$("#content").formValidator({onshow:"请输入content",onfocus:"content至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的content长度不正确,请确认"});
		//$("#imgUrl").formValidator({onshow:"请输入imgUrl",onfocus:"imgUrl至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的imgUrl长度不正确,请确认"});
		//$("#cTime").formValidator({onshow:"请输入cTime",onfocus:"cTime至少要输入5个汉字",oncorrect:"恭喜你,你输对了"}).inputValidator({min:10,onerror:"你输入的cTime长度不正确,请确认"});
		
    });
</script>
